﻿@model IEnumerable<ggHD.WebSite.TicketService.TicketHeader>

@{
    ViewBag.Title = "Задачи поддержки";
}

@section scripts{
    <script>
        $(function () {

            $("input[id='dateFrom']").datepicker({ altFormat: "dd.mm.yy", dateFormat: "dd.mm.yy" }).val('@ViewBag.DateFrom.ToString("dd.MM.yyyy")');
            $("input[id='dateTo']").datepicker({ altFormat: "dd.mm.yy", dateFormat: "dd.mm.yy" }).val('@ViewBag.DateTo.ToString("dd.MM.yyyy")');

        });

    </script>
}

<nav class="navbar navbar-default sub-navbar" role="navigation">
    <div class="collapse navbar-collapse pull-left">
        <ul class="nav navbar-nav">
            <li><a href="#" style="color:green">Действие</a></li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" style="color:red" data-toggle="dropdown">
                    Еще<b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a>П1</a></li>
                    <li class="divider"></li>
                    <li><a>П2</a></li>
                    <li><a>Заблокировать домен</a></li>
                    <li class="divider"></li>
                    <li><a>Все письма с этим адресом</a></li>
                    <li><a>Все письма с этим доменом</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="collapse navbar-collapse pull-right">
        <form class="navbar-form navbar-left" action="/Tickers/Index" method="post">
            <div class="form-group">
                <input type="text" class="form-control date-picker" id="dateFrom" name="dateFrom" /><span> - </span>
                <input type="text" class="form-control date-picker" id="dateTo" name="dateTo" />
            </div>
            <button type="submit" class="btn btn-default">Фильтр</button>
        </form>
        <ul class="nav navbar-nav">
            <li>
                <button type="button" class="btn btn-default navbar-btn" id="loadNewMailsBtn">Загрузить</button>
            </li>
        </ul>
    </div>
</nav>
@{
    ggHD.WebSite.Controllers.TicketsController.PresentationType presType = ViewBag.PresType;
}
@switch (presType)
{
    case ggHD.WebSite.Controllers.TicketsController.PresentationType.Table:
        Html.RenderPartial("_TicketTablePartial");
        break;

}
@*@if ( == ggHD.WebSite.Controllers.TicketsController.PresentationType.Table) { }*@